﻿using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;

public class LuaLoaderTool
{
    public static string resource_path = Application.dataPath + "/../Game/";
    public static string resource_lua_path = resource_path + "Lua/";


    public static byte[] LoadFile(ref string fileName)
    {
        string file_content = "";
        if (Application.platform == RuntimePlatform.WindowsEditor)
        {
            fileName = fileName.Replace(".", "/");
            file_content = File.ReadAllText(resource_lua_path + fileName + ".lua");
        }
        return Encoding.UTF8.GetBytes(file_content);
    }
}
